<template>
	<view class="all">
		<view class="head">
			<view style="margin-left: 5pt;">
				<image style="width: 36pt;height: 36pt;vertical-align: middle;" src="../../static/discovery/icon1.png">
				</image>
			</view>
			<view>
				<text style="font-size: 16pt;font-weight: bold;color: #ffffff;">社区</text>
			</view>
			<view style="margin-right: 5pt;">
				<image style="width: 16pt;height: 16pt;margin-right: 4pt;vertical-align: middle;"
					src="../../static/discovery/icon2.png" mode=""></image>
				<image style="width: 16pt;height: 16pt;vertical-align: middle;" src="../../static/discovery/icon3.png"
					mode=""></image>
			</view>
		</view>
		<view class="search">
			<input type="text" value="" placeholder="搜索相关内容" />
		</view>
		<view class="content">
			<view class="topbar">
				<view v-for="item in topbarData" :key="item.id" :class="(item.id == activeId ? 'topbar-item':'')"
					:mark:id="item.id" @tap="changetab">
					{{item.text}}
				</view>
			</view>
			<scroll-view scroll-x="true" class="scroll-view" enable-flex="true">
				<view class="scroll-view1">
					<view class="scroll-view-item1">
						<image style="width:11pt;height: 11pt;" src="../../static/discovery/icon5.png"></image>
						<text>开工见面礼</text>
					</view>
					<view class="scroll-view-item2">
						<text>牛年开工大吉领红包</text>
					</view>
					<view class="scroll-view-item3">
						<text>晒实盘 红包再翻倍</text>
					</view>
					<view class="scroll-view-item4">
						<button>立即参与</button>
					</view>

				</view>
				<view class="scroll-view2">
					<view class="scroll-view-item1">
						<image style="width:11pt;height: 11pt;" src="../../static/discovery/icon6.png"></image>
						<text>牛年买牛基</text>
					</view>
					<view class="scroll-view-item2">
						<text>有奖征文</text>
					</view>
					<view class="scroll-view-item3">
						<text>分享你最看好的基金</text>
					</view>
					<view class="scroll-view-item4">
						<button>立即参与</button>
					</view>

				</view>
			</scroll-view>
			<view class="card">
				<view class="card-head">
					<view class="card-head-left">
						<image style="width: 36pt;height: 36pt;" src="@/static/discovery/icon15.png"></image>
						<view>
							<view class="card-head-left-name">
								<text>迪迦奥特曼</text>
								<text>财龄1年</text>
							</view>
							<text class="card-head-left-time">04-10 16:46:33</text>
						</view>
					</view>
					<button class="btn"><text>关注</text><image  style="width: 12px;height: 12px;vertical-align: middle;" src="../../static/discovery/icon13.png" mode=""></image></button>
				</view>
				<view class="card-title">
					<text>春节后基金连续下跌2日，还好有稳固收益呀！</text>
				</view>
				<view class="card-label">
					<text>#实盘秀#</text>
					<text>#投资心得#</text>
					<text>#牛年买牛基#</text>
				</view>
				<view class="card-img">
					<image src="../../static/discovery/item1.png"></image>
					<image src="../../static/discovery/item2.png"></image>
					<image src="../../static/discovery/item3.png"></image>
				</view>
				<view class="card-name">
					<image src="../../static/discovery/icon14.png"></image>
					<text>景顺长城鼎益混合型证...</text>
					<text>+21.18%</text>
				</view>
				<view class="card-actions">
					<view class="actions-item">
						<image src="../../static/discovery/share.png"></image>
						<text>分享</text>
					</view>
					<view class="actions-item">
						<image src="../../static/discovery/comment.png"></image>
						<text>9250</text>
					</view>
					<view  class="actions-item" style="border: none;">
						<image src="../../static/discovery/dianzan.png"></image>
						<text>1029</text>
					</view>
				</view>
			</view>
			<view class="card">
				<view class="card-head">
					<view class="card-head-left">
						<image style="width: 36pt;height: 36pt;" src="@/static/discovery/icon16.png "></image>
						<view>
							<view class="card-head-left-name">
								<text>赛文奥特曼</text>
								<text>财龄1年</text>
							</view>
							<text class="card-head-left-time">04-10 16:46:33</text>
						</view>
					</view>
					<button class="btn" style="color: #ccc;"><text>取消关注</text></button>
				</view>
				<view class="card-title">
					<text>今日大盘点评：大盘比预想中的强势，当日就进行了修复，收下影线。微盘对港基进行少量补仓，仓位一百万。目前看春季行情还在继续。近期货币政...</text>
				</view>
				<view class="card-label">
					<text>#实盘秀#</text>
					<text>#牛年买牛基#</text>
				</view>
				<view class="card-img">
					<image src="../../static/discovery/item4.png"></image>
					<image src="../../static/discovery/item5.png"></image>
				</view>
				<view class="card-name">
					<image src="../../static/discovery/icon14.png"></image>
					<text>招商中证白酒指数(L...)</text>
					<text>+21.18%</text>
				</view>
				<view class="card-actions">
					<view class="actions-item">
						<image src="../../static/discovery/share.png"></image>
						<text>分享</text>
					</view>
					<view class="actions-item">
						<image src="../../static/discovery/comment.png"></image>
						<text>8560</text>
					</view>
					<view  class="actions-item" style="border: none;">
						<image src="../../static/discovery/dianzan.png"></image>
						<text>999</text>
					</view>
				</view>
			</view> 
			<view class="findpeople">
				<view class="line">
				</view>
				<text>帮你发现更有趣的人</text>
			</view>
			<view class="people">
				<view class="people-item">
					<image src="../../static/discovery/icon9.png"></image>
					<text>倪哥</text>
					<text>非知名财经分析</text>
					<button type="default">+关注</button>
				</view>
				<view class="people-item">
					<image src="../../static/discovery/icon10.png"></image>
					<text>赛文奥特曼</text>
					<text>推荐给你专业的TA</text>
					<button type="default">+关注</button>
				</view>
				<view class="people-item">
					<image src="../../static/discovery/icon11.png"></image>
					<text>迪迦奥特曼</text>
					<text>文案策划</text>
					<button type="default">+关注</button>
				</view>
			</view>
			<view class="card">
				<view class="card-head">
					<view class="card-head-left">
						<image style="width: 36pt;height: 36pt;" src="@/static/discovery/icon12.png "></image>
						<view>
							<view class="card-head-left-name">
								<text>迪迦奥特曼</text>
								<text>财龄1年</text>
							</view>
							<text class="card-head-left-time">04-10 16:46:33</text>
						</view>
					</view>
					<button class="btn"><text>关注</text><image  style="width: 12px;height: 12px;vertical-align: middle;" src="../../static/discovery/icon13.png" mode=""></image></button>
				</view>
				<view class="card-title">
					<text>这个月赚的余量不多啦，哈哈！</text>
				</view>
				<view class="card-label">
					<text>#实盘秀#</text>
					<text>#投资心得#</text>
					<text>#牛年买牛基#</text>
				</view>
				<view class="card-img">
					<image src="../../static/discovery/item6.png"></image>
					<image src="../../static/discovery/item7.png"></image>
					<image src="../../static/discovery/item8.png"></image>
				</view>
				<view class="card-name">
					<image src="../../static/discovery/icon14.png"></image>
					<text>齐鲁锦泉2号14天1...</text>
					<text>+21.18%</text>
				</view>
				<view class="card-actions">
					<view class="actions-item">
						<image src="../../static/discovery/share.png"></image>
						<text>分享</text>
					</view>
					<view class="actions-item">
						<image src="../../static/discovery/comment.png"></image>
						<text>7140</text>
					</view>
					<view  class="actions-item" style="border: none;">
						<image src="../../static/discovery/dianzan.png"></image>
						<text>798</text>
					</view>
				</view>
			</view>           
			<view class="foot">
				加载更多...
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				topbarData: [{
						id: 0,
						text: "关注"
					},
					{
						id: 1,
						text: "推荐"
					},
					{
						id: 2,
						text: "圈子"
					},
					{
						id: 3,
						text: "视频"
					},
					{
						id: 4,
						text: "直播"
					},
				],
				activeId: 1
			}
		},
		methods: {
			changetab(event) {

				this.activeId = event.mark.id

			},
		}
	}
</script>

<style lang="scss" scoped>
	
	.all {
		width: 100vw;
		height: 100vh;

		.head {
			width: 100%;
			height: 100rpx;
			background-color: #3476f1;
			display: flex;
			justify-content: space-between;
			line-height: 100rpx;
		}

		.search {
			width: 100%;
			height: 80pt;
			background-color: #3476f1;
			line-height: 50pt;
			overflow: hidden;

			input {
				width: 96%;
				height: 30pt;
				background-color: #fff;
				margin: 0 auto;
				border-radius: 15pt;
				padding: 0 266rpx;
				box-sizing: border-box;
				background-image: url(../../static/discovery/icon4.png);
				background-repeat: no-repeat;
				background-position: 226rpx 30rpx;
				margin-top: 30rpx;
			}


		}

		.content {
			width: 100%;
			background-color: #fff;
			border-top-left-radius: 50rpx;
			border-top-right-radius: 50rpx;
			position: absolute;
			top: 120px;
			left: 0;
			overflow: hidden;
			white-space: nowrap;

			.topbar {
				width: 100%;
				height: 30pt;
				margin-top: 25rpx;
				display: flex;
				justify-content: space-evenly;
				font-size: 28rpx;
				color: #999999;
				line-height: 30pt;

				.topbar-item {
					width: 40pt;
					height: 25pt;
					background-color: #3476f1;
					color: #fff;
					text-align: center;
					line-height: 25pt;
					border-radius: 5pt;
				}
			}

			.scroll-view {
				width: 740rpx;
				height: 124pt;

				.scroll-view1 {
					width: 241pt;
					height: 100%;
					border-radius: 5pt;
					background-image: url(../../static/discovery/banner1.png);
					background-repeat: no-repeat;
					background-size: cover;
					margin-left: 12pt;
					display: inline-block;

					.scroll-view-item1 {
						font-size: 11pt;
						color: #be7f22;
						margin-top: 12pt;
						margin-left: 12pt;

						image {
							vertical-align: middle;
							margin-right: 2pt;
						}

						text {
							vertical-align: middle;
						}
					}

					.scroll-view-item2 {
						font-size: 14pt;
						color: #333;
						margin-top: 12pt;
						margin-left: 12pt;
						font-weight: 550;
					}

					.scroll-view-item3 {
						font-size: 12pt;
						color: #333;
						margin-top: 6pt;
						margin-left: 12pt;
					}

					.scroll-view-item4 {
						button {
							width: 84pt;
							height: 26pt;
							font-size: 12pt;
							line-height: 26pt;
							margin: 0;
							background-color: #be7f22;
							color: #fff;
							margin-top: 6pt;
							margin-left: 12pt;
							border-radius: 15pt;
						}
					}
				}

				.scroll-view2 {
					width: 241pt;
					height: 100%;
					border-radius: 5pt;
					background-image: url(../../static/discovery/banner2.png);
					background-repeat: no-repeat;
					background-size: cover;
					margin-left: 12pt;
					display: inline-block;

					.scroll-view-item1 {
						font-size: 11pt;
						color: #53b6c8;
						margin-top: 12pt;
						margin-left: 12pt;

						image {
							vertical-align: middle;
							margin-right: 2pt;
						}

						text {
							vertical-align: middle;
						}
					}

					.scroll-view-item2 {
						font-size: 14pt;
						color: #333;
						margin-top: 12pt;
						margin-left: 12pt;
						font-weight: 550;
					}

					.scroll-view-item3 {
						font-size: 12pt;
						color: #333;
						margin-top: 6pt;
						margin-left: 12pt;
					}

					.scroll-view-item4 {
						button {
							width: 84pt;
							height: 26pt;
							font-size: 12pt;
							line-height: 26pt;
							margin: 0;
							background-color: #53b6c8;
							color: #fff;
							margin-top: 6pt;
							margin-left: 12pt;
							border-radius: 15pt;
						}
					}
				}
			}
			.card{
				width: 681rpx;
				margin: 0 auto;
				margin-top: 10pt;
				box-shadow: 0 0 5px 1px #ccc;
				border-radius: 5pt;
				border: 1px solid #ccc;
				margin-bottom: 10pt;
				.card-head{
					width: 656rpx;
					height: 36pt;
					display: flex;
					margin-top: 12pt;
					justify-content: space-between;
					.card-head-left{
						height: 100%;
						display: flex;
						margin-left: 12pt;
						image{
							margin-right: 5pt;
						}
						.card-head-left-name{
							height: 50rpx;
							line-height: 50rpx;
							text:nth-child(1){
								font-weight: 550;
							}
							text:nth-child(2){
								 display: inline-block;
								 width: 100rpx;
								 height: 35rpx;
								 color: #e3c79d;
								 font-size: 12px;
								 background-color: #fcf5ec;
								 line-height: 35rpx;
								 text-align: center;
								 margin-left: 5pt;
							}
						}
						.card-head-left-time{
							font-size: 12px;
							color: #ccc;
						}
					}
					.btn{
						width: 140rpx;
						height: 52rpx;
						border: 1px solid #f9f9f9;
						color: #4e87f2;
						margin: 0;
						margin-top: 20rpx;
						font-size: 10pt;
						line-height: 42rpx;
						outline: none;
						background-color: #fff;
						text-align: center;
						padding: 0;
						text{
							vertical-align: middle;
						}
					}
				}
				.card-title{
					width: 656rpx;
					font-size: 14px;
					margin: 0 auto;
					margin-top: 10rpx;
					text{
						width: 100%;
						white-space: pre-wrap;
						word-wrap: break-word;
						margin-left: 12pt;
					}
				}
				.card-label{
					color: #4e87f2;
					font-size: 13px;
					margin: 0 auto;
					margin-top: 10rpx;
					width: 656rpx;
					text:nth-child(1){
						margin-right: 20rpx;
						margin-left: 12pt;
					}
					text:nth-child(2){
						margin-right: 20rpx;
					}
				}
				.card-img{
					width: 656rpx;
					height: 276rpx;
					display: flex;
					margin: 0 auto;
					margin-top: 16rpx;
					
					image{
						width: 208rpx;
						height: 100%;
						margin-right: 5pt;
					}
					image:nth-child(1){
						margin-left: 12pt;
					}
				}
				.card-name{
					width: 220pt;
					height: 24pt;
					background-color: rgb(234,241,254);
					margin-left: 15pt;
					border-radius: 15pt;
					line-height: 24pt;
					margin-top: 10pt;
					font-size: 14px;
					image{
						width: 16pt;
						height: 16pt;
						margin-left: 10pt;
						vertical-align: middle;
						margin-right: 5pt;
					}
					text:nth-of-type(2){
						color: red;
					}
				}
				.card-actions{
					width: 100%;
					height: 20pt;
					margin-top: 20pt;
					display: flex;
					margin-bottom: 5pt;
					.actions-item{
						width: 33.3%;
						height: 100%;
						border-right: 1px solid #ccc;
						text-align: center;
						image{
							width: 12pt;
							height: 12pt;
							vertical-align: middle;
							margin-right: 2pt;
						}
						text{
							color: #ccc;
							font-size: 10pt;
						}
					}
					
				}
			}
			.findpeople{
				width: 681rpx;
				height: 20pt;
				border: 1px solid #f5f7f9;
				margin: 0 auto;
				line-height: 20pt;
				border-radius: 15pt;
				display: flex;
				.line{
					width: 3pt;
					height: 14pt;
					background-color: #3476f1;
					border-radius: 15pt;
					margin-top: 3pt;
					margin-left: 10pt;
					margin-right: 5pt;
				}
				text{
					font-weight: 700;	
				}
			}
			.people{
				width: 681rpx;
				height: 180px;
				margin: 10pt auto;
				background-color: #fcfcfc;
				display: flex;
				justify-content: space-between;
				.people-item{
					width: 110px;
					height: 100%;
					border: 1px solid #f5f7f9;
					text-align: center;
					border-radius: 5pt;
					background-color: #fff;
					image{
						display: block;
						width: 54pt;
						height: 54pt;
						margin: 10px auto;
					}
					text:nth-of-type(1){
						display: block;
						font-size: 16px;
						font-weight: 700;
						margin: 0 auto;
						text-align: center;
					}
					text:nth-of-type(2){
						display: block;
						font-size: 13px;
						color: #ccc;
						margin: 5px auto;
						text-align: center;
					}
					button{
						width: 70px;
						height: 25px;
						border: none;
						background-color: #3476f1;
						border-radius: 5pt;
						margin: 0 auto;
						font-size: 14px;
						color: #fff;
						padding: 0;
						line-height: 25px;
					}
				}
			}
			.foot{
				width: 681rpx;
				height: 40px;
				margin: 5pt auto;
				color: #ccc;
				font-size: 16px;
				text-align: center;
				line-height: 40px;
			}
		} 
	}
</style>
